import request from '@/utils/request'
// 获取房产列表
export function getHouseList(params) {
  return request({
    url: '/properties',
    method: 'get',
    params

  })
}
// 获取房产数量
export function getHouseListCount(params) {
  return request({
    url: '/properties/count',
    method: 'get',
    params
  })
}
// 新建房产
export function getNewHouse(data) {
  return request({
    url: '/properties',
    method: 'post',
    data
  })
}
// 删除房产
export function delHouse(id) {
  return request({
    url: `/properties/+${id}`,
    method: 'DELETE'

  })
}
// 获取指定房产
export function getHouseById(id) {
  return request({
    url: `/properties/+${id}`,
    method: 'get'

  })
}
// 编辑房产
export function editHouse(data) {
  return request({
    url: `/properties/${data.id}`,
    method: 'put',
    data

  })
}
